﻿/*
 * Created by SharpDevelop.
 * User: Miguel
 * Date: 27/11/2011
 * Time: 05:31 p.m.
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;
using Business_Logic;

namespace PetSoft.GUI.Configuracion
{
	/// <summary>
	/// Description of GUIMenuConfiguracion.
	/// </summary>
	public partial class GUIMenuConfiguracion : Form
	{
		public GUIMenuConfiguracion()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			BLPrivilegio blpriv = new BLPrivilegio();
						
			if (!blpriv.existeVentana("CONF","TIEN",BLInfo.usuarioActual.Rol.Privilegio))
            		this.mantTiendaBTN.Enabled = false;        
			if (!blpriv.existeVentana("CONF","VALO",BLInfo.usuarioActual.Rol.Privilegio))
            		this.mantValoresBTN.Enabled = false;   			
			
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void MantTiendaBTNClick(object sender, EventArgs e)
		{
			GUIMantenimientoTienda tienda=new GUIMantenimientoTienda();
			tienda.ShowDialog(this);
		}
		
		void MantValoresBTNClick(object sender, EventArgs e)
		{
			GUIBuscarVal valores=new GUIBuscarVal();
			valores.ShowDialog(this);
		}
		
		void SalirBTNClick(object sender, EventArgs e)
		{
			this.Close();
		}
		
		void Button1Click(object sender, EventArgs e)
		{
			GUIConfiguracionInicial v = new GUIConfiguracionInicial();
			v.ShowDialog(this);
		}
	}
}
